<script setup>
  import { inject } from 'vue'
  const { setIsShowDialog } = inject('dialog-show')
  
  const handleClick = () => {
    setIsShowDialog(true)
  }
</script>

<template>
  <div class="search-container">
    <div class="button" @click="handleClick">+</div>
    <div class="input">
      <input type="text" placeholder="请输入关键字...">
    </div>
  </div>
</template>

<style lang="less">
  .search-container{
    height: 60px;
    background: #d3d3d3;
    display: flex;
    justify-content: center;
    align-items: center;
    .button {
      width: 40px;
      height: 40px;
      background-color: #1e90ff;
      padding-left: 0;
      border-radius: 5px;
      font-size: 30px;
      font-weight: bold;
      color: #fff;
      text-align: center;
      cursor: default;
    }
    .input {
      flex: 1;
      height: 36px;
      padding: 0 10px;
      input {
        outline: none; //输入时样式
        border: solid 1px #ccc;
        border-radius: 5px;
        height: 100%;
        width: 100%;
        padding: 0 10px;
      }
    }
  }

</style>